/**
 * @MediatorCreateEvent.as.as
 * 
 * @author sodaChen mail:asframe@163.com
 * @version 1.0
 * <br>Copyright (C), 2012 ASFrame.com
 * <br>This program is protected by copyright laws.
 * <br>Program Name:ASFrame AStruts2
 * <br>Date:2012-4-28
 */
package com.asframe.astruts2.mvc.mediator
{
	import com.asframe.astruts2.beans.MediatorBean;
	import com.asframe.astruts2.context.IAStrutsContext;
	import com.asframe.astruts2.interfaces.IMediatorCreateEvent;
	import com.asframe.astruts2.mvc.view.IMvcView;
	
	public class MediatorCreateEvent implements IMediatorCreateEvent
	{
		public function MediatorCreateEvent()
		{
		}
		
		public function isTally(mediator:*):Boolean
		{
			return mediator is IMediator;
		}
		
		public function mediatorCreateEvent(view:*, mediator:*, mediatorBean:MediatorBean, context:IAStrutsContext):void
		{
			var mvcView:IMvcView = view as IMvcView;
			var mvcMediator:IMediator = mediator as IMediator;
			mvcView.init();
			mvcMediator.init();
		}
	}
}
